# ------- validate that either a block device or a filename is entered
if [ -a $lbu_device ]; then
lbu_devtype=`ls -ld $lbu_device | cut -c1`
if [ $lbu_devtype = b ]; then
lbu_ext=""
fi
if [ $lbu_devtype = c ]; then
lbu_msgtyp="Warning" ; lbu_msgtxt="You have selected a character special\ndevice. Normally such a device is\nselected only if it is a tapedrive\nor similar stream device."
lbu_hgt=8 ; lbu_wth=45
lbu_message
lbu_ext=""
fi
if [ $lbu_devtype = d ]; then
lbu_msgtyp="Error" ; lbu_msgtxt="File specified is a directory.\nPlease specify a file or device."
lbu_hgt=6 ; lbu_wth=40
lbu_message
lbu_loop2=1
fi
if [ $lbu_devtype = l ]; then
lbu_msgtyp="Error" ; lbu_msgtxt="File specified is a link.\nPlease specify a file or device."
lbu_hgt=6 ; lbu_wth=40
lbu_message
lbu_loop2=1
fi
else
if [ -a $lbu_device$lbu_ext ]; then
lbu_msgtyp="Informational" ; lbu_msgtxt="The file $lbu_device$lbu_ext exists and \nis not a device file. If a BACKUP is being performed\nit will be overwritten. If this is not OK, reselect the device."
lbu_hgt=7 ; lbu_wth=70
lbu_message
else
touch $lbu_device$lbu_ext 2> /dev/null
rm $lbu_device$lbu_ext 2> /dev/null
if [ $? != 0 ]; then
lbu_msgtyp="Error" ; lbu_msgtxt="Path to file $lbu_device$lbu_ext not present.\nPlease re-enter."
lbu_hgt=6 ; lbu_wth=70
lbu_message
lbu_loop2=1
else
lbu_msgtyp="Warning" ; lbu_msgtxt="The file $lbu_device$lbu_ext does NOT exist.\nIf a BACKUP is being performed it will be created as\nan ordinary file.\nIf you are about to perform a RESTORE operation\nit will FAIL unless you specify an existing file or device."
lbu_msgtyp="Informational" ; lbu_msgtxt="One of the files or directories specified\ndoes not exist. If doing a BACKUP this will\ncause the Status Screen to show FAILURE\neven though existing files WILL have been\nbacked up. Be sure to check the logfile."
lbu_msgtyp="Informational" ; lbu_msgtxt="Cannot have compressed multi-volume archives.\nCompression parameter set to 'none'.\nYOU MUST RE-SELECT THE BACKUP DEVICE."